// 对外暴露配置路由（常量路由）
export const constantRoute = [
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login', // 命名路由
        meta: { // 路由元信息
            title: '登录',
            icon: 'Key',
            hidden: true // 代表路由标题在菜单中是否隐藏 true：隐藏，false：不隐藏
        }
    },
    {
        path: '/home',
        // redirect: '/home', // 重定向
        // alias: '/home', // 路由别名
        component: () => import('@/views/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '企业管理',
            icon: 'Briefcase',
            hidden: false
        },
        children: [ // 二级路由
            {
                path: '/home/companyList',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '企业列表',
                    hidden: false
                }
            }
        ]
    },
    {
        path: '/404',
        redirect: '/herdStructure/herdList', // 路由重定向，牛群结构
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            icon: 'Link',
            hidden: true
        }
    },
    {
        // 日常管理
        path: '/daily',
        component: () => import('@/views/layout/index.vue'),
        name: 'Daily',
        meta: {
            title: '日常管理',
            hidden: false,
            icon: 'Menu'
        },
        children: [
            {
                path: '/daily/grow',
                component: () => import('@/views/daily/grow/index.vue'),
                name: 'Grow',
                meta: {
                    title: '生长发育',
                    hidden: false
                }
            },
            {
                path: '/daily/breed',
                component: () => import('@/views/daily/breed/index.vue'),
                name: 'Breen',
                meta: {
                    title: '品种登记',
                    hidden: false
                }
            },
            {
                path: '/daily/slaughter',
                component: () => import('@/views/daily/slaughter/index.vue'),
                name: 'Slaughter',
                meta: {
                    title: '屠宰性能',
                    hidden: false
                }
            },
            {
                path: '/daily/semenQuality',
                component: () => import('@/views/daily/semenQuality/index.vue'),
                name: 'semenQuality',
                meta: {
                    title: '种公牛精液品质',
                    hidden: false
                }
            },
            {
                path: '/daily/groupFlow',
                component: () => import('@/views/daily/groupFlow/index.vue'),
                name: 'groupFlow',
                meta: {
                    title: '群体流动',
                    hidden: false
                }
            },
            {
                path: '/daily/giveMilk',
                component: () => import('@/views/daily/giveMilk/index.vue'),
                name: 'giveMilk',
                meta: {
                    title: '产奶记录',
                    hidden: false
                }
            },
            {
                path: '/daily/DHIsample',
                component: () => import('@/views/daily/DHIsample/index.vue'),
                name: 'DHIsample',
                meta: {
                    title: 'DHI取样',
                    hidden: false
                }
            },
            {
                path: '/daily/pregnancyRecord',
                component: () => import('@/views/daily/pregnancyRecord/index.vue'),
                name: 'PregnancyRecord',
                meta: {
                    title: '配种妊娠记录',
                    hidden: false
                }
            },
            {
                path: '/daily/deliver',
                component: () => import('@/views/daily/deliver/index.vue'), // deliver
                name: 'Deliver',
                meta: {
                    title: '分娩产犊记录',
                    hidden: false
                }
            }
        ]
    },
    {
        // 统计分析
        path: '/analysis',
        component: () => import('@/views/layout/index.vue'),
        name: 'Analysis',
        meta: {
            title: '统计分析',
            icon: 'TrendCharts',
            hidden: false
        },
        children: [
            {
                path: '/analysis/comGrow',
                component: () => import('@/views/analysis/comGrow/index.vue'),
                name: 'ComGrow',
                meta: {
                    title: '母牛生长发育统计',
                    hidden: false
                }
            },
            {
                path: '/analysis/bullGrow',
                component: () => import('@/views/analysis/bullGrow/index.vue'),
                name: 'BullGrow',
                meta: {
                    title: '种公牛生长发育统计',
                    hidden: false
                }
            },
            {
                path: '/analysis/productionAndSales',
                component: () => import('@/views/analysis/productionAndSales/index.vue'),
                name: 'ProductionAndSales',
                meta: {
                    title: '种牛产销基本情况统计',
                    hidden: false
                }
            },
            {
                path: '/analysis/reproduction',
                component: () => import('@/views/analysis/reproduction/index.vue'),
                name: 'Reproduction',
                meta: {
                    title: '繁殖性能统计',
                    hidden: false
                }
            },
            {
                path: '/analysis/coreCrowd',
                component: () => import('@/views/analysis/coreCrowd/index.vue'),
                name: 'CoreCrowd',
                meta: {
                    title: '核心群存栏统计',
                    hidden: false
                }
            },
            {
                path: '/analysis/determineDataSummary',
                component: () => import('@/views/analysis/determineDataSummary/index.vue'),
                name: 'DetermineDataSummary',
                meta: {
                    title: '测定数据汇总',
                    hidden: false
                }
            },
            {
                path: '/analysis/sexuallyStat',
                component: () => import('@/views/analysis/sexuallyStat/index.vue'),
                name: 'SexuallyStat',
                meta: {
                    title: '性状统计记录',
                    hidden: true
                }
            },
            {
                path: '/analysis/pedigreeStat',
                component: () => import('@/views/analysis/pedigreeStat/index.vue'),
                name: 'PedigreeStat',
                meta: {
                    title: '系谱统计记录',
                    hidden: false
                }
            },
            {
                path: '/analysis/bullList',
                component: () => import('@/views/analysis/bullList/index.vue'),
                name: 'BullList',
                meta: {
                    title: '培育种公牛统计表',
                    hidden: false
                }
            }
        ]
    },
    {
        // 牛群结构
        path: '/herdStructure',
        component: () => import('@/views/layout/index.vue'),
        name: 'HerdStructure',
        meta: {
            title: '牛群结构',
            icon: 'List',
            hidden: false
        },
        children: [
            {
                path: '/herdStructure/herdList',
                component: () => import('@/views/herdStructure/herdList/index.vue'),
                name: 'HerdList',
                meta: {
                    title: '牛群列表',
                    hidden: false
                }
            },
        ]
    },
    {
        // 健康管理
        path: '/healthManage',
        component: () => import('@/views/layout/index.vue'),
        name: 'healthManage',
        meta: {
            title: '健康管理',
            icon: 'Flag',
            hidden: false
        },
        children: [
            {
                path: '/healthManage/sickenRecord',
                component: () => import('@/views/healthManage/sickenRecord/index.vue'),
                name: 'SickenRecord',
                meta: {
                    title: '发病记录',
                    hidden: false
                }
            },
            {
                path: '/healthManage/medicalCertificate',
                component: () => import('@/views/healthManage/medicalCertificate/index.vue'),
                name: 'MedicalCertificate',
                meta: {
                    title: '种群健康证明',
                    hidden: false
                }
            },
            {
                path: '/healthManage/immunoRecord',
                component: () => import('@/views/healthManage/immunoRecord/index.vue'),
                name: 'ImmunoRecord',
                meta: {
                    title: '免疫记录',
                    hidden: false
                }
            },
        ]
    },
    {
        // 系统管理
        path: '/acl',
        component: () => import('@/views/layout/index.vue'),
        name: 'Acl',
        meta: {
            title: '系统管理',
            icon: 'Avatar',
            hidden: false
        },
        children: [
            {
                path: '/acl/menu',
                component: () => import('@/views/acl/menu/index.vue'),
                name: 'AclMenu',
                meta: {
                    title: '菜单管理',
                    hidden: true
                }
            },
            {
                path: '/acl/role',
                component: () => import('@/views/acl/role/index.vue'),
                name: 'AclRole',
                meta: {
                    title: '角色权限',
                    hidden: true
                }
            },
            {
                path: '/acl/user',
                component: () => import('@/views/acl/user/index.vue'),
                name: 'AclUser',
                meta: {
                    title: '用户管理',
                    hidden: false
                }
            }
        ]
    },
    {   
        // 任意路由
        path: '/:pathMatch(.*)*',
        redirect: '/404', // 路由重定向
        name: 'Any',
        meta: {
            title: '任意路由',
            icon: 'Aim',
            hidden: true
        }
    }
]